/**
 * @(#)BaseObjectInterface.java 19 Enero 2006 17:46:08
 *
 * Copyright (c) 2005-2010 Psiqueware S.A. de C.V. All Rights Reserved.
 * This software is the proprietary information Psiqueware S.A. de C.V.
 * Use is subject to license terms.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *
 * <br/>Usuario : AngelElectrico
 * <br/>Creaci&oacute;n: 19 Enero 2006
 * <br/>
 * <br/>
 * <br/><t5>Cambios :</t5>
 * <br/><b>Fecha | Autor  |  Cambios</b>
 * <ul>
 * <li>19 Enero 2006 17:46:08 | <a href = "mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a> | Creaci&oacute;n del Objeto.</li>
 *
 * </ul>
 */

package com.psiqueware.alheli.basico;

import java.io.Serializable;

/**
 * Interfase que expone los m&eacute;todos del {@link BaseObject}, para la implementaci&oacute;n
 * de programaci&oacute;n defensiva sobre un modelo de dominio rico.
 * <br/>Paquete Original: com.psiqueware.basico
 * <br/>Nombre  Original: BaseObjectInterfase
 * <br/><a href="BaseObjectInterfase.java.html"><i>Ver C&oacute;digo Fuente</i> </a>
 *
 * @author <a href="mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a>
 * @version Revision: 1.1 19-ene-2006 17:46:08
 */
public interface BaseObjectInterface<T> extends Serializable, Comparable<T>
{

    /**
     * Devuelve el identificador &uacute;nico de este objeto.
     *
     * @return id &uacute;nico de este objeto.
     */
    Long getId();

    /**
     * Compara este objeto con otro.
     *
     * @param obj a ser igualado con este.
     *
     * @return <code>true</code> si los objeto son iguales; <code>false</code> en caso contrario.
     */
    boolean equals(Object obj);

    /**
     * Description of the Method
     *
     * @return Description of the Return Value
     */
    int hashCode();

    /**
     * Representaci&oacute;n textual de este objeto.
     *
     * @return String representando el contenido del objeto.
     */
    String toString();

    /**
     * Realiza una comparaci&oacute;n de este objeto contra otro a fin de
     * realizar una ordenaci&oacute;n natural. De ser necesario alterar el
     * orden de objetos se factible sobrecargar este m&eacute;todo.
     *
     * @see Comparable#compareTo
     */
    int compareTo(T o);
}
